package t20211225;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

/**
 * @Author: DengJia
 * @Date: 2021/12/25 17:38
 * @Description:
 */

public class LearnMap {
    public static void main(String[] args) {
        Random random = new Random(47);
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < 10000; i++) {
            int r = random.nextInt(20);
            Integer feq = map.get(r);
            map.put(r, feq == null ? 1 : feq + 1);
        }
        System.out.println("map.size() = " + map.size());
        System.out.println("map = " + map);

        HashMap<String, List<?>> m = new HashMap<>();

    }
}
